package handin07;

public class MembershipCreator {
	
	public static IMembership issueMembership(MembershipPlan plan)
	{
		IMembership membership;
		
		switch(plan)
		{
		case GUEST: 
			membership = new Membership(plan, 0, 0);
			break;
		case BRONZE: 
			membership = new Membership(plan, 0.10, 10);
			break;
		case SILVER: 
			membership = new Membership(plan, 0.25, 20);
			break;
		case GOLD: 
			membership = new Membership(plan, 1.0, 100);
			break;
		default:
			membership = null;
			break;
		}
		
		return membership;
	}

}
